﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;

namespace QLGiayDep
{
    class OtherHandle
    {
        public void IsNumber(TextBox m_txt)
        {
            for (int i = 0; i < m_txt.Text.Trim().Length; i++)
            {
                if (m_txt.Text[i] != '0' &&
                    m_txt.Text[i] != '1' &&
                    m_txt.Text[i] != '2' &&
                    m_txt.Text[i] != '3' &&
                    m_txt.Text[i] != '4' &&
                    m_txt.Text[i] != '5' &&
                    m_txt.Text[i] != '6' &&
                    m_txt.Text[i] != '7' &&
                    m_txt.Text[i] != '8' &&
                    m_txt.Text[i] != '9' &&
                    m_txt.Text[i] != '.')
                {
                    MessageBox.Show("Chỉ nhập số dương", "Lỗi");
                    m_txt.Text = "";
                }
            }
        }
    }
}
